<template>
  <div class="message" >
    <ul>
      <li><span>标题:  </span><el-input v-model="shuju.title"></el-input></li>
      <li><span>摘要:  </span><el-input v-model="shuju.description"></el-input></li>
      <li><span>关键字:  </span><el-input v-model="shuju.keywords"></el-input></li>
      <li><span>正文:  </span></li>
      <li><textarea v-model="shuju.content"></textarea></li>
      <li><el-button type="primary" @click="xiugai">修改</el-button></li>
    </ul>
  </div>
</template>

<script>
import axios from "_axios@0.24.0@axios";

export default {
  name: "bjwz",
  data(){
    return{
      id:"",
      shuju:{}
    }
  },
  mounted() {
    let that=this
    this.id = localStorage.getItem('iid');
    axios.post(
        'http://localhost:9090/api/Member/MemberChaXun',
        this.$qs.stringify({id:this.id})
    ).then(function (response) {
      that.shuju=response.data
    })
  },
  methods:{
    xiugai(){
      let that=this
      axios.post(
          'http://localhost:9090/api/Member/WenzGenXin',
          this.$qs.stringify(this.shuju)
      ).then(function (response) {
        that.$alert('修改成功', '修改', {
          confirmButtonText: '确定',
          callback: action => {
            that.$router.push({'path':'/loginH/wdwz'})
          }
        });
      })
    }
  }

}
</script>

<style scoped="scoped">
  .message{
    width: 80%;
  }
  .message ul li {
    line-height: 50px;
    padding-left: 50px;
    text-align: left;
  }
  .message ul li span {
    font-weight: bold;
    color: #000;
    width: 100px;
  }
  .message el-input{
    width: 60px;
  }
  textarea{
    width: 330px;
    height: 100px;
    resize:none;
  }
</style>